<template>
      <div class="default-table-detail-container">
            <BaseTableInfo v-model="baseTableInfoModel" />
      </div>
</template>

<script lang="ts" setup>

import CheckInfoApi from '/@/api/CheckInfoApi.ts';

const props = defineProps({
      modelValue: {

      }
})
const route = useRouter()

const baseTableInfoModel = ref({
      columnCount: 3,
      autoFit: false,
      columnWidth: '300px',
      labelWidth: '100px',
      title: '基本信息',
      modelData: {},
      itemList: [
            {
                  title: '',
                  items: [   //渲染样式区域  通过key ===model 中的值
                        // {
                        //       label: "id",
                        //       field: "id",
                        // },
                        // {
                        //       label: "创建人",
                        //       field: "creator",
                        // },
                        // {
                        //       label: "修改人",
                        //       field: "reviser",
                        // },
                        // {
                        //       label: "排序",
                        //       field: "sort",
                        // },
                        {
                              label: "创建时间",
                              field: "create_time",
                        },
                        {
                              label: "更新时间",
                              field: "update_time",
                        },
                        {
                              label: "委托方",
                              field: "clientName",
                        },
                        {
                              label: "委托方地址",
                              field: "clientAddress",
                        },
                        {
                              label: "付款方",
                              field: "payer",
                        },
                        {
                              label: "联系人",
                              field: "contactPerson",
                        },
                        {
                              label: "联系电话",
                              field: "contactPhone",
                        },
                        {
                              label: "规格型号",
                              field: "specModel",
                        },
                        {
                              label: "样品名称",
                              field: "sampleName",
                        },
                        {
                              label: "质量等级",
                              field: "qualityLevel",
                        },
                        {
                              label: "生产/加工日期",
                              field: "produceDate",
                        },
                        {
                              label: "商标",
                              field: "trademark",
                        },
                        {
                              label: "委托日期",
                              field: "entrustDate",
                        },
                        {
                              label: "生产单位名称",
                              field: "produceUnit",
                        },
                        {
                              label: "标称生产者地址",
                              field: "producerAddress",
                        },
                        {
                              label: "受检单位",
                              field: "inspectedUnit",
                        },
                        {
                              label: "报告编号",
                              field: "reportNo",
                        },
                        {
                              label: "执行标准",
                              field: "execStandard",
                        },
                        {
                              label: "客户名称",
                              field: "customerName",
                        },
                        {
                              label: "报告类型",
                              field: "reportType",
                        },
                        {
                              label: "报告发放日期",
                              field: "reportIssueDate",
                        },
                        {
                              label: "发放方式",
                              field: "issueMethod",
                        },
                        {
                              label: "发放人",
                              field: "issuer",
                        },
                        {
                              label: "接收人",
                              field: "receiver",
                        }]
            }
      ],
      buttons: [   //标题操作区域
            // {
            //   name: "更多",
            //  buttonClass: 'danger',
            // width: 100,
            // click: (any: object) => {   //暴露的方法钩子
            // $baseMessage("这里执行业务", 'success', 'vab-hey-message-success');
            //},
            //},


      ]
})

onMounted(async () => {
      //初始化数据model
      const { data } = await CheckInfoApi.getDetail({
            checkInfoId: props.modelValue.query.checkInfoId   //从路由中获取参数
      })
      baseTableInfoModel.value.modelData = data;





})
</script>

<style lang="scss" scoped>
.default-table-detail-container {
      :deep() {
            .el-form--inline {
                  .el-form-item {
                        margin-right: 10px;
                  }
            }

            .el-descriptions__label {
                  min-width: 80px !important;
                  text-align: right;
            }
      }
}
</style>
